The Microsoftr Win32 Internet functions provide Win32-based applications with easy access to common Internet protocols. These functions abstract the Internet's Gopher, FTP (file transfer protocol), and HTTP (hypertext transfer protocol) protocols into a high-level application programming interface (API) that is familiar to independent software vendors (ISVs) and software developers, and that provides a fast and straightforward path to making applications Internet-aware.
Overview of the Win32 Internet Functions
The following table summarizes the Win32 Internet functions. Each function indicates any functions that it is dependent on. A dependent function can be called only after the related higher-level function is called. This is because the higher-level function returns a handle and sets up a state at the protocol level that is a prerequisite to the successful execution of the dependent function or functions.
General Win32 Internet Functions
InternetOpen
Initializes the application's use of the Win32 Internet functions and creates the root HINTERNET handle
InternetConnect
Opens an FTP, Gopher, or HTTP session with a server. This function requires a handle created by InternetOpen .
InternetCloseHandle
Closes any designated handle created by a Win32 Internet function and any handles derived from that handle.
InternetReadFile
Dowloads data from the Internet. This function requires a handle created by HttpOpenRequest.
HTTP (World Wide Web) Functions
HttpOpenRequest
Opens an HTTP request handle. This function requires a handle created by InternetConnect.
HttpAddRequestHeaders
Adds HTTP request headers to the HTTP request handle. This function requires a handle created by HttpOpenRequest.
HttpSendRequest
Sends the specified request to the HTTP server. This function requires a handle created by HttpOpenRequest.
HttpQueryInfo
Queries information about an HTTP request. This function requires a handle created by HttpOpenRequest.
InternetErrorDlg
Displays predefined dialog boxes for common Internet error conditions. Requires the handle used in the call to the function HttpSendRequest.